package com.yzt.minemodule.adapter;

import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.yzt.zhuju.network.entity.mine.set.SettingEntry;
import com.yzt.minemodule.R;

/**
 * author : bob
 * date   : 2022/12/1
 * desc   : 设置模块适配器
 */
public class SettingAdapter extends BaseQuickAdapter<SettingEntry, BaseViewHolder> {

    public SettingAdapter() {
        super(R.layout.item_layout_setting);
    }

    @Override
    protected void convert(BaseViewHolder holder, SettingEntry item) {
        holder.setText(R.id.title_tv, item.getTitle());
        holder.setText(R.id.content_tv, item.getContent());
        holder.setGone(R.id.content_tv, TextUtils.isEmpty(item.getContent()));
        holder.setVisible(R.id.msg_view, item.isMsgTips());
    }
}
